<template>
  <div class="more-action">
    <!-- 状态一-->
    <van-cell-group v-if="!isReport">
      <van-cell @click="dislike">不感兴趣</van-cell>
      <van-cell is-link @click="isReport = true">反馈垃圾内容</van-cell>
    </van-cell-group>
    <!-- 状态二-->
    <van-cell-group v-else>
      <van-cell icon="arrow-left" @click="isReport = false">返回</van-cell>
      <van-cell v-for="item in reportsList" :key="item.value" @click="report(item.value)">{{
        item.label
      }}</van-cell>
    </van-cell-group>
  </div>
</template>

<script>
import reportsList from '@/constant/reports.js'
export default {
  name: 'moreaction',
  data () {
    return {
      isReport: false,
      reportsList
    }
  },
  methods: {
    report (type) {
      this.$emit('report', type)
    },
    dislike () {
      this.$emit('dislike')
    }
  }
}
</script>

<style lang='less' scoped>
.more-action {
  border-radius: 4px;
}
</style>
